<div id="Recursive-behavior"></div>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[cvs: Branching and merging#Merging-and-keywords  &lt; ]|</td>
<td valign="middle" align="left">|[cvs: Adding, removing, and renaming files and directories#Adding-and-removing  &gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[cvs: Branching and merging#Branching-and-merging  &lt;&lt; ]|</td>
<td valign="middle" align="left">|[[cvs#Top| Up ]]|</td>
<td valign="middle" align="left">|[cvs: Adding, removing, and renaming files and directories#Adding-and-removing  &gt;&gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[cvs: Table of Contents#SEC_Contents Contents]|</td>
<td valign="middle" align="left">|[cvs: Index#Index Index]|</td>
<td valign="middle" align="left">|[cvs: About this Manual#SEC_About  ? ]|</td>
</tr></table>
<div id="Recursive-behavior-1"></div>
== Recursive behavior ==
<div id="index-Recursive-_0028directory-descending_0029"></div>
<div id="index-Directory_002c-descending"></div>
<div id="index-Descending-directories"></div>
<div id="index-Subdirectories"></div>

<p>Almost all of the subcommands of <small>CVS</small> work
recursively when you specify a directory as an
argument.  For instance, consider this directory
structure:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example"><nowiki>      <code>$HOME</code>
        |
        +--<tt>tc</tt>
        |   |
            +--<tt>CVS</tt>
            |      (internal CVS files)
            +--<tt>Makefile</tt>
            +--<tt>backend.c</tt>
            +--<tt>driver.c</tt>
            +--<tt>frontend.c</tt>
            +--<tt>parser.c</tt>
            +--<tt>man</tt>
            |    |
            |    +--<tt>CVS</tt>
            |    |  (internal CVS files)
            |    +--<tt>tc.1</tt>
            |
            +--<tt>testing</tt>
                 |
                 +--<tt>CVS</tt>
                 |  (internal CVS files)
                 +--<tt>testpgm.t</tt>
                 +--<tt>test2.t</tt>
</nowiki></pre></td></tr></table>

<p>If &lsquo;<tt>tc</tt>&rsquo; is the current working directory, the
following is true:
</p>
<ul>
<li>
&lsquo;<samp>cvs update testing</samp>&rsquo; is equivalent to

<table><tr><td>&nbsp;</td><td><pre class="example"><nowiki>cvs update testing/testpgm.t testing/test2.t
</nowiki></pre></td></tr></table>

</li><li>
&lsquo;<samp>cvs update testing man</samp>&rsquo; updates all files in the
subdirectories

</li><li>
&lsquo;<samp>cvs update .</samp>&rsquo; or just &lsquo;<samp>cvs update</samp>&rsquo; updates
all files in the <code>tc</code> directory
</li></ul>

<p>If no arguments are given to <code>update</code> it will
update all files in the current working directory and
all its subdirectories.  In other words, &lsquo;<tt>.</tt>&rsquo; is a
default argument to <code>update</code>.  This is also true
for most of the <small>CVS</small> subcommands, not only the
<code>update</code> command.
</p>
<p>The recursive behavior of the <small>CVS</small> subcommands can be
turned off with the &lsquo;<samp>-l</samp>&rsquo; option.
Conversely, the &lsquo;<samp>-R</samp>&rsquo; option can be used to force recursion if
&lsquo;<samp>-l</samp>&rsquo; is specified in &lsquo;<tt>~/.cvsrc</tt>&rsquo; (see section [cvs: Guide to CVS commands#g_t_007e_002f_002ecvsrc Default options and the ~/.cvsrc file]).
</p>
<table><tr><td>&nbsp;</td><td><pre class="example"><nowiki>$ cvs update -l         # <span class="roman">Don't update files in subdirectories</span>
</nowiki></pre></td></tr></table>

<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[cvs: Branching and merging#Branching-and-merging  &lt;&lt; ]|</td>
<td valign="middle" align="left">|[cvs: Adding, removing, and renaming files and directories#Adding-and-removing  &gt;&gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[cvs: Table of Contents#SEC_Contents Contents]|</td>
<td valign="middle" align="left">|[cvs: Index#Index Index]|</td>
<td valign="middle" align="left">|[cvs: About this Manual#SEC_About  ? ]|</td>
</tr></table>
This document was generated by <em>a tester</em> on <em>a sunny day</em> using [http://www.nongnu.org/texi2html/ <em>texi2html</em>].
